import { sessionStorage } from 'src/assets/js/storage'

const mutations = {
  SET_USER (state, user) {
    state.user = user
    sessionStorage.setItem('user', user)
  },
  SET_TOKEN (state, token) {
    state.token = token
    sessionStorage.setItem('token', token)
  },
  SET_REFRESHTOKEN (state, refreshToken) {
    state.refreshToken = refreshToken
    sessionStorage.setItem('refreshToken', refreshToken)
  },
  SET_USERID (state, userId) {
    state.userId = userId
    sessionStorage.setItem('userId', userId)
  }
}

export default mutations

